<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>{{project.group}}</groupId>
  <artifactId>{{project.artifact}}</artifactId>
  <version>{{project.version}}</version>
  <packaging>jar</packaging>

  <name>{{project.name}}</name>
  <description>{{project.description}}</description>
  
  <properties>
    <java.version>11</java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <!-- jfinal框架 -->    
    <dependency>
        <groupId>com.jfinal</groupId>
        <artifactId>jfinal</artifactId>
        <version>4.9.10</version>
    </dependency>
    <!-- undertow服务器集成 -->
    <dependency>
        <groupId>com.jfinal</groupId>
        <artifactId>jfinal-undertow</artifactId>
        <version>2.5</version>
    </dependency>
    <!-- 文件上传 -->
    <dependency>
      <groupId>com.jfinal</groupId>
      <artifactId>cos</artifactId>
      <version>2019.8</version>
    </dependency>
    <!-- Websocket消息通信 -->  
    <dependency>
        <groupId>io.undertow</groupId>
        <artifactId>undertow-websockets-jsr</artifactId>
        <version>2.0.34.Final</version>
    </dependency>
		<!-- 数据库驱动 -->
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.38</version>
		</dependency>
		<!-- 数据库连接池 -->
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>druid</artifactId>
			<version>1.2.6</version>
		</dependency>
  	<!-- Json -->
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>fastjson</artifactId>
			<version>1.2.68</version>
		</dependency>
		<!-- 任务调度 -->
		<dependency>
			<groupId>it.sauronsoftware.cron4j</groupId>
			<artifactId>cron4j</artifactId>
			<version>2.2.5</version>
    </dependency>
		<!-- log4j日志 -->
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.17</version>
		</dependency>
    <!-- 全能工具 -->
    <dependency>
      <groupId>cn.hutool</groupId>
      <artifactId>hutool-all</artifactId>
      <version>5.6.4</version>
    </dependency>
		<!-- 单元测试 -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

    <build>
        <finalName>{{project.name}}</finalName>
        <plugins>
            <!--编译-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>UTF-8</encoding>
                    <!-- 保留参数名编译参数 -->
                    <compilerArgument>-parameters</compilerArgument>
                </configuration>
            </plugin>

            <!--打Jar包-->
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-jar-plugin</artifactId>
              <version>3.2.0</version>
              <configuration>
                <archive>
                  <manifest>
                    <mainClass>{{project.group}}.{{project.artifact}}.App</mainClass>   <!-- 设置 main class -->
                    <addClasspath>true</addClasspath>         <!-- 在 manifest 文件中添加 classpath -->
                    <classpathPrefix>lib</classpathPrefix>    <!-- classpath 前缀 -->
                  </manifest>
                </archive>
              </configuration>
            </plugin>
            
            <!--拷贝第三方依赖文件到指定目录-->
            <!--参考：https://www.yuque.com/inuter/bc7ikc/vzshwx-->
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-dependency-plugin</artifactId>
              <version>3.1.2</version>
              <executions>
                <execution>
                  <phase>package</phase>
                  <goals>
                    <goal>copy-dependencies</goal>
                  </goals>
                  <configuration>
                    <outputDirectory>${project.build.directory}/lib</outputDirectory>
                    <includeScope>test</includeScope>
                  </configuration>
                </execution>
              </executions>
            </plugin>
        </plugins>
    </build>
</project>